<?php
/**
 * 测试库存总数统计功能
 */

// 模拟请求参数
$testParams = [
    'product_id' => '1,2,3',  // 产品ID，支持多个
    'warehouse_id' => '1',     // 仓库ID
    'is_futures' => 0,         // 是否期货：0-现货，1-期货
    'arrival_date' => '2025-01-27'  // 到货日期
];

echo "测试参数：\n";
print_r($testParams);

echo "\nAPI调用示例：\n";
echo "GET /admin/inventory_count/total_count?" . http_build_query($testParams);

echo "\n\n功能说明：\n";
echo "1. 新增方法：getInventoryTotalCount()\n";
echo "2. 路由：/admin/inventory_count/total_count\n";
echo "3. 参数：product_id, warehouse_id, is_futures, arrival_date\n";
echo "4. 返回：库存总数、可发货数、已发货数、锁定数、实际可用数\n";

echo "\n返回数据格式：\n";
echo "{\n";
echo "  \"code\": 0,\n";
echo "  \"data\": {\n";
echo "    \"total_qty\": 1000,\n";
echo "    \"available_shipment_qty\": 800,\n";
echo "    \"shipped_qty\": 200,\n";
echo "    \"lock_qty\": 100,\n";
echo "    \"actually_available_qty\": 700\n";
echo "  },\n";
echo "  \"message\": \"success\"\n";
echo "}\n"; 